From 3ff757502b3688cf8b879fafaa256e7b63ca1ea6 Mon Sep 17 00:00:00 2001 From: "mjw@wray-m-3.hpl.hp.com" Date: Thu, 2 Sep 2004 09:34:42 +0000 Subject: [PATCH] bitkeeper revision 1.1159.1.114 (4136e932LBZ1uaMs2kLCvyBHOfuxTQ) Trap vifctl errors and warn. --- tools/python/xen/xend/XendVnet.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/python/xen/xend/XendVnet.py b/tools/python/xen/xend/XendVnet.py index 83506b6c6c..9ef019e333 100644 --- a/tools/python/xen/xend/XendVnet.py +++ b/tools/python/xen/xend/XendVnet.py @@ -53,8 +53,11 @@ class XendVnetInfo: return vnet_cmd(['vnet.del', self.id]) def vifctl(self, op, vif, vmac): - fn = self.vifctl_ops[op] - return vnet_cmd([fn, ['vif', vif], ['vmac', vmac]]) + try: + fn = self.vifctl_ops[op] + return vnet_cmd([fn, ['vif', vif], ['vmac', vmac]]) + except XendError: + log.warning("vifctl failed: op=%s vif=%s mac=%s", op, vif, vmac) class XendVnet: """Index of all vnets. Singleton. @@ -72,8 +75,8 @@ class XendVnet: self.vnet[info.id] = info try: info.configure() - except: - log.exception("Error configuring vnet") + except XendError, ex: + log.warning("Failed to configure vnet %s: %s", str(info.id), str(ex)) def vnet_of_bridge(self, bridge): """Get the vnet for a bridge (if any). -- 2.30.2